let str = 'abc345efg'
let num = str.match(/\d/g).join('')
let newNum
let arr = []
console.log(num);
for (let i = 0; i < num.length; i++) {
    newNum = `[${num[i]}]`
    console.log(newNum);
    arr.push(newNum)
    console.log(arr);
}
let newArr = arr.join('')
console.log(newArr);
let str1 = 'abc'
let newStr = str1.concat(newArr).concat('e', 'd', 'f')
console.log(newStr);
alert(`${newStr}`)



